<?php get_instance()->view('common/header');?>
<div class="page-container home">
  <?php get_instance()->view('common/sidebar');?>
  <div class="page-content-wrapper">
	  <div class="page-content">
	    <div class="row">
	      <div class="col-md-12">
	        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
	        <h3 class="page-title"> <?php echo $title ?> </h3>
	        <ul class="page-breadcrumb breadcrumb">
                <?php if (adminAuthority('county-add', 'config')):?>
	          <li class="btn-group"> <a href="<?php echo getUrl('config/county/add');?>" type="button" class="btn blue"> <i class="fa fa-plus"></i> 新增</a></li>
	            <?php endif;?>
                <li><a href="javascript:void(0);"><i class="fa fa-home"></i>区域管理员列表 </a></li>
	        </ul>
	        <!-- END PAGE TITLE & BREADCRUMB-->
	      </div>
	    </div>
	    <div class="row">
	      <div class="col-md-12">
	      
	      		<div class="well">
					<form>
	                    <div class="form-body">
	                    	<div class="row">
		                    	<div class="col-md-6">
			                     	<div class="form-group">
		                                <label class="control-label col-md-2">姓名： </label>
		                                <div class="col-md-10">
		                                   <input class="form-control form-filter" name="manager" type="text">
		                                </div>
		                           </div> 
	                           </div>  
	                           <div class="col-md-6">
			                     	<div class="form-group">
		                                <label class="control-label col-md-2">账号： </label>
		                                <div class="col-md-10">
		                                   <input class="form-control form-filter" name="account" type="text">
		                                </div>
		                           </div> 
	                           </div>  
                           </div>        
	                    	<div class="row" style="margin-top: 10px;">
		                    	<div class="col-md-6">
			                     	<div class="form-group">
		                                <label class="control-label col-md-2">区域名称： </label>
		                                <div class="col-md-10">
		                                   <input class="form-control form-filter" name="section_name" type="text">
		                                </div>
		                           </div> 
	                           </div>  
	                           <div class="col-md-6">
			                     	<div class="form-group">
		                                <label class="control-label col-md-2">状态： </label>
		                                <div class="col-md-10">
		                                	<select class="form-control form-filter" name="status">
		                                   	   <option value="">所有</option>
		                                   	   <?php foreach ($status as $k => $v):?>
		                                   	   <option value="<?php echo $k;?>"><?php echo $v;?></option>
		                                   	   <?php endforeach;?>
		                                   </select> 
		                                </div>
		                           </div> 
	                           </div>  
                           </div>        
	                    	<div class="row" style="margin-top: 10px;">
		                    	<div class="col-md-12">
			                     	<div class="form-group location">
		                                <label style="width: 8.17666667%;" class="control-label col-md-2">区域： </label>
		                                <div class="col-md-3">
		                                
		                                   <select class="form-control province form-filter" placeholder="省份" name="province">
		                                   	   <option value=""></option>
		                                   	   <?php foreach ($province as $v):?>
		                                   	   <option value="<?php echo $v['id'];?>"><?php echo $v['name'];?></option>
		                                   	   <?php endforeach;?>
		                                   </select>
		                                </div>
		                                <div class="col-md-3">
		                                   <select class="form-control city form-filter" placeholder="城市" name="city">
		                                     <option value=""></option>
		                                   </select>
		                                </div>
		                                <div class="col-md-3">
		                                   <select class="form-control form-filter county" name="county[]" placeholder="区县" multiple></select>
		                                </div>
		                           </div> 
	                           </div> 
	                           <script type="text/javascript">
	                           		$(function(){
	                           			localtion.init({boxId:".location",url:"<?php echo getUrl('config/county/getAreaByPid');?>"});	
		                           	});
	                           </script> 
                           </div>
                           <div class="row" style="margin-top: 10px;">
                           		<div class="col-md-6">
			                     	<div class="form-group">
			                     		<label class="control-label col-md-2"> </label>
		                           		<div class="col-md-6">
			                                   <button type="button" class="btn btn-default seach-btn"><i class="fa fa-search"></i> 搜索</button>
			                                   <script type="text/javascript">
													$(function(){
														$('.seach-btn').click(function(){
															$('#datatable').dataTable().fnDraw(true);
														});
													});
			                                   </script>
		                                </div>
                                	</div>
                                </div>
                           </div>     
	                    </div>	
                    </form>			 
				</div>
	      		<div class="portlet">
	            <div class="portlet-body">
	              <div class="table-container">
	                <div class="table-actions-wrapper"> <span> </span></div>
	                <table class="table table-bordered table-hover" id="datatable">
	                  <thead>
	                    <tr role="row" class="heading">
	                      <th width="10%"> 名称 </th>
	                      <th width="10%">帐号</th>
	                      <th width="10%">电话</th>
	                      <th width="10%">区域名称</th>
	                      <th width="20%">管理区域</th>
	                      <th width="8%">添加时间</th>
	                      <th width="5%">状态</th>
	                      <th width="5%">操作</th>
	                    </tr>
	                  </thead>
	                  <tbody></tbody>
	                </table>
	              </div>
	            </div>
	          </div>
	      </div>
	    </div>
	  </div>
  </div>
</div>
<script type="text/javascript">
	$(function(){
		datatable_init({
			src: $("#datatable"),
			sAjaxSource: "<?php echo getUrl('config/county/getList');?>",
			"sDom": "<'row'<'col-md-5 col-sm-12'<'table-group-actions pull-right'>>r><'table-scrollable't><'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>r>>",
			bSort:false
		});

		$('select').select2({allowClear:true});
	});
</script>
</body>
</html>